package cn.wubo.base.service.impl;

import cn.wubo.base.entity.RoleEntity;
import cn.wubo.base.repository.RoleRepository;
import cn.wubo.base.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    RoleRepository roleRepository;

    @Override
    public RoleEntity saveAndFlush(RoleEntity role) {
        return roleRepository.saveAndFlush(role);
    }

    @Override
    public List<RoleEntity> findAll() {
        return roleRepository.findAll();
    }

    @Override
    public void deleteInBatch(List<RoleEntity> roles) {
        roleRepository.deleteInBatch(roles);
    }
}
